import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class LoginName extends StatefulWidget{
  @override
  _LoginNameState createState()=>_LoginNameState();
}
class _LoginNameState extends State<LoginName>{
  TextEditingController _loginNameEditingController;
  FocusNode _focusNode;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    _loginNameEditingController=TextEditingController()..addListener(() {

    });
    _focusNode=FocusNode()..addListener(() {
      if(!_focusNode.hasFocus){
        //失去焦点验证
      }
    });
  }
  OverlayEntry _messageOverlay=OverlayEntry(
      builder: (context){
        return Text('overlay');
      });
  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return TextField();
  }
}